package com.indusfo.spc.mapper;

import com.indusfo.spc.pojo.InspectWork;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface InspectWorkMapper {

    int insertSelective(InspectWork record);

    InspectWork selectByPrimaryKey(Integer inspectWorkId);

    int updateByPrimaryKeySelective(InspectWork record);

    // 查询设备点检作业
    List<InspectWork> selectInspectWork(@Param("inspectWork")InspectWork inspectWork,@Param("startDate") String startDate,@Param("endDate") String endDate);
    // 分页计数
    int countInspectWork(@Param("inspectWork")InspectWork inspectWork,@Param("startDate") String startDate,@Param("endDate") String endDate);
    // 停用/启用/删除
    int definedInspectWork(@Param("inspectWorkIds") Long[] inspectWorkIds,@Param("dataState") Integer dataState);
    // 审核/反审核
    int auditInspectWork(@Param("inspectWorkIds")Long[] inspectWorkIds,@Param("auditState") Integer auditState);
    // 单号查重
    Integer queryInspectWorkCode(InspectWork inspectWork);
    // 根据设备ID查询
    int selectByDeviceId(@Param("deviceIds") Long[] deviceIds);
}